/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.seckill.multishop.param;

import com.yami.shop.seckill.common.model.SeckillSku;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 保存秒杀信息参数
 *
 * @author LGH
 * @date 2019-08-28 09:36:59
 */
@Data
public class SeckillParam {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("秒杀活动id")
    private Long seckillId;

    @ApiModelProperty("活动名称")
    @NotNull
    private String seckillName;

    @ApiModelProperty("开始时间")
    @NotNull
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty("结束时间")
    @NotNull
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty("活动标签")
    private String seckillTag;

    @ApiModelProperty("限购数量")
    private Integer maxNum;

    @ApiModelProperty("取消订单时间")
    @Min(2)
    @Max(15)
    @NotNull
    private Integer maxCancelTime;

    @ApiModelProperty("商品id")
    @NotNull
    private Long prodId;

    @ApiModelProperty("秒杀商品规格列表")
    @NotNull
    @NotEmpty
    private List<SeckillSku> seckillSkus;
}
